#pragma once
#include <d3dx9.h>
#include "TwEngineDx.h"

class sa_TwBillBoard
{
public:
	sa_TwBillBoard(void);
	~sa_TwBillBoard(void);

	void InitGraphics();

	void InitRenderState();

	void InitLight();

	void Update();

	void Render();

	void Clear();

	void render_grid();

	void render_particle();

	void set_particle(float x, float y, float z, float r);
private:
	LPDIRECT3DVERTEXBUFFER9 t_buffer;    // the pointer to the particle's vertex buffer
	LPDIRECT3DVERTEXBUFFER9 g_buffer;    // the pointer to the grid's vertex buffer
	float camx, camy, camz;    // camera position
	D3DXMATRIX matRotateX;
	D3DXMATRIX matRotateY;
	// texture declarations
	LPDIRECT3DTEXTURE9 texture;
};
